package com.li.senbiao.serial.bean;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

public class JDKBean implements Externalizable {

	private int intVar;
	
	private String str="abc";
	
	@Override
	public void writeExternal(ObjectOutput out) throws IOException {
		out.writeInt(intVar);
		out.writeUTF(str);
		
	}

	@Override
	public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
		this.intVar = in.readInt();
		this.str = in.readUTF();
	}
	
	
	public int getIntVar() {
		return intVar;
	}

	public void setIntVar(int intVar) {
		this.intVar = intVar;
	}

	public String getStr() {
		return str;
	}

	public void setStr(String str) {
		this.str = str;
	}
}
